package cn.swjtuhc.ss.hljapi.service.impl;

import cn.swjtuhc.ss.hljapi.mapper.EssayMapper;
import cn.swjtuhc.ss.hljapi.pojo.Essay;
import cn.swjtuhc.ss.hljapi.service.EssayService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 程序狗没有春天
 * @version 1.00
 * @createTime 2024/8/24 23:26
 */
@Service
public class EssayServiceImpl extends ServiceImpl<EssayMapper, Essay> implements EssayService{
    @Autowired
    private EssayMapper essayMapper;
    @Override
    public void deleteById(Integer id) {
        essayMapper.deleteById(id);
    }

    @Override
    public void insertAll(Essay essay) {
        essayMapper.insert(essay);
    }

    @Override
    public Essay findById(Integer id) {
        Essay essay = essayMapper.selectById(id);
        return essay;
    }

}
